package com.yaodian100.ec.member.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

import com.yaodian100.core.common.entity.BaseEntity;

/**
 * @author feeling.wang
 * 
 */
@Entity
@Table(name = "EC_MEMBER_ADDRESS_BOOK")
public class AddressBook extends BaseEntity {

	/**
	 * serialVersionUID
	 */
	private static final long serialVersionUID = -268030470521451964L;

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO, generator = "seq_ec_member_address_book")
	@SequenceGenerator(name = "seq_ec_member_address_book", sequenceName = "SEQ_EC_MEMBER_ADDRESS_BOOK")
	@Column(name = "ID")
	private Long id;

	@Column(name = "MEMBER_ID", length = 10, nullable = false)
	private String memberId;

	@Column(name = "CONTACT_NAME", length = 20, nullable = false)
	private String contactName;

	@Column(name = "MOBILE", length = 20)
	private String mobile;

	@Column(name = "AREA_CODE", length = 10)
	private String areaCode;

	@Column(name = "PHONE", length = 20)
	private String phone;

	@Column(name = "EXTENSION", length = 10)
	private String extension;

	@Column(name = "ZIP_CODE", length = 10, nullable = false)
	private String zipCode;

	// @ManyToOne(fetch = FetchType.EAGER)
	// @JoinColumn(name = "PROVINCE", nullable = false, insertable = false, updatable = false)
	// private Province provinceObj;

	@Column(name = "PROVINCE", length = 20, nullable = false)
	private String province;

	// @ManyToOne(fetch = FetchType.EAGER)
	// @JoinColumn(name = "CITY", nullable = false, insertable = false, updatable = false)
	// private City cityObj;

	@Column(name = "CITY", length = 20, nullable = false)
	private String city;

	// @ManyToOne(fetch = FetchType.EAGER)
	// @JoinColumn(name = "DISTRICT", nullable = false, insertable = false, updatable = false)
	// private District districtObj;

	@Column(name = "DISTRICT", length = 20, nullable = false)
	private String district;

	@Column(name = "ADDR", length = 100, nullable = false)
	private String addr;

	@Column(name = "MEMO", length = 100)
	private String memo;

	public String getAddr() {
		return addr;
	}

	public String getAreaCode() {
		return areaCode;
	}

	public String getCity() {
		return city;
	}

	public String getContactName() {
		return contactName;
	}

	public String getDistrict() {
		return district;
	}

	public String getExtension() {
		return extension;
	}

	public Long getId() {
		return id;
	}

	public String getMemberId() {
		return memberId;
	}

	public String getMemo() {
		return memo;
	}

	public String getMobile() {
		return mobile;
	}

	public String getPhone() {
		return phone;
	}

	public String getProvince() {
		return province;
	}

	public String getZipCode() {
		return zipCode;
	}

	public void setAddr(String addr) {
		this.addr = addr;
	}

	public void setAreaCode(String areaCode) {
		this.areaCode = areaCode;
	}

	public void setCity(String city) {
		this.city = city;
	}

	public void setContactName(String contactName) {
		this.contactName = contactName;
	}

	public void setDistrict(String district) {
		this.district = district;
	}

	public void setExtension(String extension) {
		this.extension = extension;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public void setMemberId(String memberId) {
		this.memberId = memberId;
	}

	public void setMemo(String memo) {
		this.memo = memo;
	}

	public void setMobile(String mobile) {
		this.mobile = mobile;
	}

	public void setPhone(String phone) {
		this.phone = phone;
	}

	public void setProvince(String province) {
		this.province = province;
	}

	public void setZipCode(String zipCode) {
		this.zipCode = zipCode;
	}
}